package com.bmps.springcloud.insuredmicroservice.model.underwrite;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;

/**
 * @author lyw
 * @date 2019-07-30 11:43:33
 */
public class RiskModel implements Serializable {

    private String flag;

    private String riskName;

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public String getRiskName() {
        return riskName;
    }

    public void setRiskName(String riskName) {
        this.riskName = riskName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }

        if (o == null || getClass() != o.getClass()){
            return false;
        }

        RiskModel that = (RiskModel) o;

        return new EqualsBuilder()
                .append(flag, that.flag)
                .append(riskName, that.riskName)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(flag)
                .append(riskName)
                .toHashCode();
    }

    @Override
    public String toString() {
        return "RiskModel{" +
                "flag='" + flag + '\'' +
                ", riskName='" + riskName + '\'' +
                '}';
    }
}
